export default function isDateValid(dateStr: string) {
  const reg = /^\d{4}-\d{2}-\d{2}$/;
      // const value = props.tableData[index][attribute];

      const year = +dateStr.substr(0, 4);
      const month = +dateStr.substr(5, 2);
      const date = +dateStr.substr(8, 2);

  if (reg.test(dateStr) && month > 0 && month <= 12 && date > 0 && date <= 31)
  {
    return true;
  }
  
  return false;
}